// import {myEncrypt} from '../untils/request/myEncrypt';
import axios from '../untils/request'

//获取验证码
export const sysGetVerifyCode = (obj) => {
    return axios.get('/api/sys/getVerifyCode' , obj)
}
// myEncrypt(JSON.stringify(data)).toUpperCase();

//登录
export const sysLogin = (obj) => {
    return axios.post('/user/login' , obj)
}
//查看
export const selectMood = (obj) => {
    return axios.post('/mood/selectMood' , obj)
}
//新增
export const addMood = (obj) => {
    return axios.post('/mood/addMood' , obj)
}
//修改
export const updateMood = (obj) => {
    return axios.post('mood/updateMood' , obj)
}
//大屏
export const histogram = (obj) => {
    return axios.post('user/histogram' , obj)
}
//大屏
export const selectUserList = (obj) => {
    return axios.post('/user/selectUserList' , obj)
}
//获取母账号列表
export const selectUserListByAdmin = (obj) => {
    return axios.post('/user/selectUserListByAdmin' , obj)
}
//上传文章
export const articleUpload = (obj) => {
    return axios.post('/article/upload' , obj)
}
//文章列表
export const selectArticleList = (obj) => {
    return axios.post('/article/selectArticleList' , obj)
}

//新增
export const addUser = (obj) => {
    return axios.post('/user/addUser' , obj)
}
//  编辑
export const updateUser = (obj) => {
    return axios.post('/user/updateUser' , obj)
}
//文章详情
export const selectArticle = (obj) => {
    return axios.post('/article/selectArticle' , obj)
}
//发表评论
export const contentsAddContents = (obj) => {
    return axios.post('/contents/addContents' , obj)
}
//查看评论
export const selectContents = (obj) => {
    return axios.post('/contents/selectContents' , obj)
}




//修改
export const earlyWarning = (obj) => {
    return axios.post('/user/earlyWarning' , obj)
}


//修改密码
export const updatePwd = (obj) => {
    return axios.put('/api/sys/user/modifyPassword' , obj)
}

//修改个人信息
export const updatePersonInfo = (obj) => {
    return axios.put('/api/sys/user/update' , obj)
}

//获取个人信息
export const getPersonInfo = (id) => {
    return axios.get('/api/sys/user/info?userId='+id)
}


//上传头像
export const uploadPersonAvatar = (obj) => {
    return axios.post('/api/sys/file/uploadFile',obj)
}

export const modifyPassword = (obj) => {

    return axios.put('/api/sys/user/modifyPassword' ,obj)
}
